export const constantRoute = [
  {
    path: '/',
    redirect: '/login',
}, {
    path: '/home',
    component: () => import('@/views/Home.vue'),
    redirect: '/home/welcome',
    children: [
      {
        path: 'welcome',
        component: () => import('@/views/welcome.vue')
      }, {
        path: 'users-list',
        component: () => import('@/views/users/UsersList.vue')
      }, {
        path: 'users-add',
        component: () => import('@/views/users/UsersEdit.vue'),
        meta: { title: '新增用户' },
      }, {
        path: 'users-edit/:id?',
        component: () => import('@/views/users/UsersEdit.vue'),
        meta: { title: '编辑用户' },
      }
    ],
  }, {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue')
  }, {
      path: '/404',
      component: () => import('@/views/404.vue'),
      name: '404'
  }, {
      //任意路由
      path: '/:pathMatch(.*)*',
      redirect: '/404',
      name: 'Any',
  }
]